--DO NOT MODIFY THIS FILE. IT IS ALWAYS OVERWRITTEN ON GENERATION.

--##SECTION BEGIN [INTERNAL STORED PROCS]

--This SQL is generated for internal stored procedures for table [Log]
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gen_Log_Delete]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[gen_Log_Delete]
GO

CREATE PROCEDURE [dbo].[gen_Log_Delete]
(
	@status_logStatusDomain_ID [Int] = null,--Entity Framework Required Parent Keys be passed in: Table 'StatusDomain'
	@task_logTask_ID [Int] = null,--Entity Framework Required Parent Keys be passed in: Table 'Task'
	@Original_ID [Int]
)
AS
SET NOCOUNT OFF;

DELETE FROM
	[dbo].[Log] 
WHERE 
	[ID] = @Original_ID;

if (@@RowCount = 0) return;


GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gen_Log_Insert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[gen_Log_Insert]
GO

CREATE PROCEDURE [dbo].[gen_Log_Insert]
(
	@Description [VarChar] (6000) = null,
	@Hours [Decimal] (4, 2) = null,
	@ID [Int] = null,
	@Note [Xml] = null,
	@StatusId [Int] = null,
	@TaskId [Int] = null,
	@UpdateTime [DateTime] = null,
	@CreatedDate [DateTime] = null,
	@CreatedBy [Varchar] (50) = null,
	@ModifiedBy [Varchar] (50) = null

)
AS
SET NOCOUNT OFF;

if (@CreatedDate IS NULL)
SET @CreatedDate = getdate()
DECLARE @ModifiedDate [DateTime]
SET @ModifiedDate = getdate()
IF (@ID < 0) SET @ID = NULL;
if ((@ID IS NULL))
BEGIN
INSERT INTO [dbo].[Log]
(
	[Description],
	[Hours],
	[Note],
	[StatusId],
	[TaskId],
	[UpdateTime],
	[CreatedDate],
	[CreatedBy],
	[ModifiedDate],
	[ModifiedBy]
)
VALUES
(
	@Description,
	@Hours,
	@Note,
	@StatusId,
	@TaskId,
	@UpdateTime,
	@CreatedDate,
	@CreatedBy,
	@ModifiedDate,
	@ModifiedBy
);

if (@@RowCount = 0) return;

END
ELSE
BEGIN
SET identity_insert [dbo].[Log] on
INSERT INTO [dbo].[Log]
(
	[ID],
	[Description],
	[Hours],
	[Note],
	[StatusId],
	[TaskId],
	[UpdateTime],
	[CreatedDate],
	[CreatedBy],
	[ModifiedDate],
	[ModifiedBy]
)
VALUES
(
	@ID,
	@Description,
	@Hours,
	@Note,
	@StatusId,
	@TaskId,
	@UpdateTime,
	@CreatedDate,
	@CreatedBy,
	@ModifiedDate,
	@ModifiedBy
);

if (@@RowCount = 0) return;

SET identity_insert [dbo].[Log] off
END


SELECT 
	[dbo].[Log].[description],
	[dbo].[Log].[hours],
	[dbo].[Log].[id],
	[dbo].[Log].[note],
	[dbo].[Log].[statusid],
	[dbo].[Log].[taskid],
	[dbo].[Log].[updatetime],
	[dbo].[Log].[CreatedBy],
	[dbo].[Log].[CreatedDate],
	[dbo].[Log].[ModifiedBy],
	[dbo].[Log].[ModifiedDate],
	[dbo].[Log].[Timestamp]

FROM
[dbo].[Log]
WHERE
	[dbo].[Log].[ID] = SCOPE_IDENTITY();
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gen_Log_Update]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[gen_Log_Update]
GO

CREATE PROCEDURE [dbo].[gen_Log_Update]
(
	@Description [VarChar] (6000) = null,
	@Hours [Decimal] (4, 2) = null,
	@Note [Xml] = null,
	@StatusId [Int] = null,
	@TaskId [Int] = null,
	@UpdateTime [DateTime] = null,
	@ModifiedBy [Varchar] (50) = null,
	@ModifiedDate [DateTime] = null,
	@Original_ID [Int],
	@Original_Timestamp timestamp
)
AS

IF (@ModifiedDate IS NULL)
SET @ModifiedDate = getdate();

SET NOCOUNT ON;
UPDATE 
	[dbo].[Log] 
SET
	[Description] = @Description,
	[Hours] = @Hours,
	[Note] = @Note,
	[StatusId] = @StatusId,
	[TaskId] = @TaskId,
	[UpdateTime] = @UpdateTime,
	[ModifiedBy] = @ModifiedBy,
	[ModifiedDate] = @ModifiedDate

WHERE
	[dbo].[Log].[ID] = @Original_ID AND
	[dbo].[Log].[Timestamp] = @Original_Timestamp


if (@@RowCount = 0) return;

SELECT
	[dbo].[Log].[description],
	[dbo].[Log].[hours],
	[dbo].[Log].[id],
	[dbo].[Log].[note],
	[dbo].[Log].[statusid],
	[dbo].[Log].[taskid],
	[dbo].[Log].[updatetime],
	[dbo].[Log].[CreatedBy],
	[dbo].[Log].[CreatedDate],
	[dbo].[Log].[ModifiedBy],
	[dbo].[Log].[ModifiedDate],
	[dbo].[Log].[Timestamp]
FROM 
[dbo].[Log]
WHERE
	[dbo].[Log].[ID] = @Original_ID
GO

--This SQL is generated for internal stored procedures for table [ObjectAttribute]
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gen_ObjectAttribute_Delete]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[gen_ObjectAttribute_Delete]
GO

CREATE PROCEDURE [dbo].[gen_ObjectAttribute_Delete]
(
	@Original_ID [Int]
)
AS
SET NOCOUNT OFF;

DELETE FROM
	[dbo].[ObjectAttribute] 
WHERE 
	[ID] = @Original_ID;

if (@@RowCount = 0) return;


GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gen_ObjectAttribute_Insert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[gen_ObjectAttribute_Insert]
GO

CREATE PROCEDURE [dbo].[gen_ObjectAttribute_Insert]
(
	@AttributeName [VarChar] (50) = null,
	@AttributeType [VarChar] (50) = null,
	@ID [Int] = null,
	@ObjectName [VarChar] (50) = null,
	@CreatedDate [DateTime] = null,
	@CreatedBy [Varchar] (50) = null,
	@ModifiedBy [Varchar] (50) = null

)
AS
SET NOCOUNT OFF;

if (@CreatedDate IS NULL)
SET @CreatedDate = getdate()
DECLARE @ModifiedDate [DateTime]
SET @ModifiedDate = getdate()
IF (@ID < 0) SET @ID = NULL;
if ((@ID IS NULL))
BEGIN
INSERT INTO [dbo].[ObjectAttribute]
(
	[AttributeName],
	[AttributeType],
	[ObjectName],
	[CreatedDate],
	[CreatedBy],
	[ModifiedDate],
	[ModifiedBy]
)
VALUES
(
	@AttributeName,
	@AttributeType,
	@ObjectName,
	@CreatedDate,
	@CreatedBy,
	@ModifiedDate,
	@ModifiedBy
);

if (@@RowCount = 0) return;

END
ELSE
BEGIN
SET identity_insert [dbo].[ObjectAttribute] on
INSERT INTO [dbo].[ObjectAttribute]
(
	[ID],
	[AttributeName],
	[AttributeType],
	[ObjectName],
	[CreatedDate],
	[CreatedBy],
	[ModifiedDate],
	[ModifiedBy]
)
VALUES
(
	@ID,
	@AttributeName,
	@AttributeType,
	@ObjectName,
	@CreatedDate,
	@CreatedBy,
	@ModifiedDate,
	@ModifiedBy
);

if (@@RowCount = 0) return;

SET identity_insert [dbo].[ObjectAttribute] off
END


SELECT 
	[dbo].[ObjectAttribute].[attributename],
	[dbo].[ObjectAttribute].[attributetype],
	[dbo].[ObjectAttribute].[id],
	[dbo].[ObjectAttribute].[objectname],
	[dbo].[ObjectAttribute].[CreatedBy],
	[dbo].[ObjectAttribute].[CreatedDate],
	[dbo].[ObjectAttribute].[ModifiedBy],
	[dbo].[ObjectAttribute].[ModifiedDate],
	[dbo].[ObjectAttribute].[Timestamp]

FROM
[dbo].[ObjectAttribute]
WHERE
	[dbo].[ObjectAttribute].[ID] = SCOPE_IDENTITY();
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gen_ObjectAttribute_Update]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[gen_ObjectAttribute_Update]
GO

CREATE PROCEDURE [dbo].[gen_ObjectAttribute_Update]
(
	@AttributeName [VarChar] (50) = null,
	@AttributeType [VarChar] (50) = null,
	@ObjectName [VarChar] (50) = null,
	@ModifiedBy [Varchar] (50) = null,
	@ModifiedDate [DateTime] = null,
	@Original_ID [Int],
	@Original_Timestamp timestamp
)
AS

IF (@ModifiedDate IS NULL)
SET @ModifiedDate = getdate();

SET NOCOUNT ON;
UPDATE 
	[dbo].[ObjectAttribute] 
SET
	[AttributeName] = @AttributeName,
	[AttributeType] = @AttributeType,
	[ObjectName] = @ObjectName,
	[ModifiedBy] = @ModifiedBy,
	[ModifiedDate] = @ModifiedDate

WHERE
	[dbo].[ObjectAttribute].[ID] = @Original_ID AND
	[dbo].[ObjectAttribute].[Timestamp] = @Original_Timestamp


if (@@RowCount = 0) return;

SELECT
	[dbo].[ObjectAttribute].[attributename],
	[dbo].[ObjectAttribute].[attributetype],
	[dbo].[ObjectAttribute].[id],
	[dbo].[ObjectAttribute].[objectname],
	[dbo].[ObjectAttribute].[CreatedBy],
	[dbo].[ObjectAttribute].[CreatedDate],
	[dbo].[ObjectAttribute].[ModifiedBy],
	[dbo].[ObjectAttribute].[ModifiedDate],
	[dbo].[ObjectAttribute].[Timestamp]
FROM 
[dbo].[ObjectAttribute]
WHERE
	[dbo].[ObjectAttribute].[ID] = @Original_ID
GO

--This SQL is generated for internal stored procedures for table [ObjectData]
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gen_ObjectData_Delete]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[gen_ObjectData_Delete]
GO

CREATE PROCEDURE [dbo].[gen_ObjectData_Delete]
(
	@ObjectAttribute_ID [Int] = null,--Entity Framework Required Parent Keys be passed in: Table 'ObjectAttribute'
	@Original_ID [Int]
)
AS
SET NOCOUNT OFF;

DELETE FROM
	[dbo].[ObjectData] 
WHERE 
	[ID] = @Original_ID;

if (@@RowCount = 0) return;


GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gen_ObjectData_Insert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[gen_ObjectData_Insert]
GO

CREATE PROCEDURE [dbo].[gen_ObjectData_Insert]
(
	@AttributeId [Int] = null,
	@ID [Int] = null,
	@Key [Int] = null,
	@Value [VarChar] (255) = null,
	@CreatedDate [DateTime] = null,
	@CreatedBy [Varchar] (50) = null,
	@ModifiedBy [Varchar] (50) = null

)
AS
SET NOCOUNT OFF;

if (@CreatedDate IS NULL)
SET @CreatedDate = getdate()
DECLARE @ModifiedDate [DateTime]
SET @ModifiedDate = getdate()
IF (@ID < 0) SET @ID = NULL;
if ((@ID IS NULL))
BEGIN
INSERT INTO [dbo].[ObjectData]
(
	[AttributeId],
	[Key],
	[Value],
	[CreatedDate],
	[CreatedBy],
	[ModifiedDate],
	[ModifiedBy]
)
VALUES
(
	@AttributeId,
	@Key,
	@Value,
	@CreatedDate,
	@CreatedBy,
	@ModifiedDate,
	@ModifiedBy
);

if (@@RowCount = 0) return;

END
ELSE
BEGIN
SET identity_insert [dbo].[ObjectData] on
INSERT INTO [dbo].[ObjectData]
(
	[ID],
	[AttributeId],
	[Key],
	[Value],
	[CreatedDate],
	[CreatedBy],
	[ModifiedDate],
	[ModifiedBy]
)
VALUES
(
	@ID,
	@AttributeId,
	@Key,
	@Value,
	@CreatedDate,
	@CreatedBy,
	@ModifiedDate,
	@ModifiedBy
);

if (@@RowCount = 0) return;

SET identity_insert [dbo].[ObjectData] off
END


SELECT 
	[dbo].[ObjectData].[attributeid],
	[dbo].[ObjectData].[id],
	[dbo].[ObjectData].[key],
	[dbo].[ObjectData].[value],
	[dbo].[ObjectData].[CreatedBy],
	[dbo].[ObjectData].[CreatedDate],
	[dbo].[ObjectData].[ModifiedBy],
	[dbo].[ObjectData].[ModifiedDate],
	[dbo].[ObjectData].[Timestamp]

FROM
[dbo].[ObjectData]
WHERE
	[dbo].[ObjectData].[ID] = SCOPE_IDENTITY();
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gen_ObjectData_Update]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[gen_ObjectData_Update]
GO

CREATE PROCEDURE [dbo].[gen_ObjectData_Update]
(
	@AttributeId [Int] = null,
	@Key [Int] = null,
	@Value [VarChar] (255) = null,
	@ModifiedBy [Varchar] (50) = null,
	@ModifiedDate [DateTime] = null,
	@Original_ID [Int],
	@Original_Timestamp timestamp
)
AS

IF (@ModifiedDate IS NULL)
SET @ModifiedDate = getdate();

SET NOCOUNT ON;
UPDATE 
	[dbo].[ObjectData] 
SET
	[AttributeId] = @AttributeId,
	[Key] = @Key,
	[Value] = @Value,
	[ModifiedBy] = @ModifiedBy,
	[ModifiedDate] = @ModifiedDate

WHERE
	[dbo].[ObjectData].[ID] = @Original_ID AND
	[dbo].[ObjectData].[Timestamp] = @Original_Timestamp


if (@@RowCount = 0) return;

SELECT
	[dbo].[ObjectData].[attributeid],
	[dbo].[ObjectData].[id],
	[dbo].[ObjectData].[key],
	[dbo].[ObjectData].[value],
	[dbo].[ObjectData].[CreatedBy],
	[dbo].[ObjectData].[CreatedDate],
	[dbo].[ObjectData].[ModifiedBy],
	[dbo].[ObjectData].[ModifiedDate],
	[dbo].[ObjectData].[Timestamp]
FROM 
[dbo].[ObjectData]
WHERE
	[dbo].[ObjectData].[ID] = @Original_ID
GO

--This SQL is generated for internal stored procedures for table [StatusDomain]
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gen_StatusDomain_Delete]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[gen_StatusDomain_Delete]
GO

CREATE PROCEDURE [dbo].[gen_StatusDomain_Delete]
(
	@Original_ID [Int]
)
AS
SET NOCOUNT OFF;

DELETE FROM
	[dbo].[StatusDomain] 
WHERE 
	[ID] = @Original_ID;

if (@@RowCount = 0) return;


GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gen_StatusDomain_Insert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[gen_StatusDomain_Insert]
GO

CREATE PROCEDURE [dbo].[gen_StatusDomain_Insert]
(
	@ID [Int] = null,
	@Status [VarChar] (50) = null,
	@CreatedDate [DateTime] = null,
	@CreatedBy [Varchar] (50) = null,
	@ModifiedBy [Varchar] (50) = null

)
AS
SET NOCOUNT OFF;

if (@CreatedDate IS NULL)
SET @CreatedDate = getdate()
DECLARE @ModifiedDate [DateTime]
SET @ModifiedDate = getdate()
IF (@ID < 0) SET @ID = NULL;
if ((@ID IS NULL))
BEGIN
INSERT INTO [dbo].[StatusDomain]
(
	[Status],
	[CreatedDate],
	[CreatedBy],
	[ModifiedDate],
	[ModifiedBy]
)
VALUES
(
	@Status,
	@CreatedDate,
	@CreatedBy,
	@ModifiedDate,
	@ModifiedBy
);

if (@@RowCount = 0) return;

END
ELSE
BEGIN
SET identity_insert [dbo].[StatusDomain] on
INSERT INTO [dbo].[StatusDomain]
(
	[ID],
	[Status],
	[CreatedDate],
	[CreatedBy],
	[ModifiedDate],
	[ModifiedBy]
)
VALUES
(
	@ID,
	@Status,
	@CreatedDate,
	@CreatedBy,
	@ModifiedDate,
	@ModifiedBy
);

if (@@RowCount = 0) return;

SET identity_insert [dbo].[StatusDomain] off
END


SELECT 
	[dbo].[StatusDomain].[id],
	[dbo].[StatusDomain].[status],
	[dbo].[StatusDomain].[CreatedBy],
	[dbo].[StatusDomain].[CreatedDate],
	[dbo].[StatusDomain].[ModifiedBy],
	[dbo].[StatusDomain].[ModifiedDate],
	[dbo].[StatusDomain].[Timestamp]

FROM
[dbo].[StatusDomain]
WHERE
	[dbo].[StatusDomain].[ID] = SCOPE_IDENTITY();
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gen_StatusDomain_Update]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[gen_StatusDomain_Update]
GO

CREATE PROCEDURE [dbo].[gen_StatusDomain_Update]
(
	@Status [VarChar] (50) = null,
	@ModifiedBy [Varchar] (50) = null,
	@ModifiedDate [DateTime] = null,
	@Original_ID [Int],
	@Original_Timestamp timestamp
)
AS

IF (@ModifiedDate IS NULL)
SET @ModifiedDate = getdate();

SET NOCOUNT ON;
UPDATE 
	[dbo].[StatusDomain] 
SET
	[Status] = @Status,
	[ModifiedBy] = @ModifiedBy,
	[ModifiedDate] = @ModifiedDate

WHERE
	[dbo].[StatusDomain].[ID] = @Original_ID AND
	[dbo].[StatusDomain].[Timestamp] = @Original_Timestamp


if (@@RowCount = 0) return;

SELECT
	[dbo].[StatusDomain].[id],
	[dbo].[StatusDomain].[status],
	[dbo].[StatusDomain].[CreatedBy],
	[dbo].[StatusDomain].[CreatedDate],
	[dbo].[StatusDomain].[ModifiedBy],
	[dbo].[StatusDomain].[ModifiedDate],
	[dbo].[StatusDomain].[Timestamp]
FROM 
[dbo].[StatusDomain]
WHERE
	[dbo].[StatusDomain].[ID] = @Original_ID
GO

--This SQL is generated for internal stored procedures for table [Task]
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gen_Task_Delete]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[gen_Task_Delete]
GO

CREATE PROCEDURE [dbo].[gen_Task_Delete]
(
	@status_taskStatusDomain_ID [Int] = null,--Entity Framework Required Parent Keys be passed in: Table 'StatusDomain'
	@Original_ID [Int]
)
AS
SET NOCOUNT OFF;

DELETE FROM
	[dbo].[Task] 
WHERE 
	[ID] = @Original_ID;

if (@@RowCount = 0) return;


GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gen_Task_Insert]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[gen_Task_Insert]
GO

CREATE PROCEDURE [dbo].[gen_Task_Insert]
(
	@Description [VarChar] (255) = null,
	@ID [Int] = null,
	@Note [Xml] = null,
	@StatusId [Int],
	@CreatedDate [DateTime] = null,
	@CreatedBy [Varchar] (50) = null,
	@ModifiedBy [Varchar] (50) = null

)
AS
SET NOCOUNT OFF;

if (@CreatedDate IS NULL)
SET @CreatedDate = getdate()
DECLARE @ModifiedDate [DateTime]
SET @ModifiedDate = getdate()
IF (@ID < 0) SET @ID = NULL;
if ((@ID IS NULL))
BEGIN
INSERT INTO [dbo].[Task]
(
	[Description],
	[Note],
	[StatusId],
	[CreatedDate],
	[CreatedBy],
	[ModifiedDate],
	[ModifiedBy]
)
VALUES
(
	@Description,
	@Note,
	@StatusId,
	@CreatedDate,
	@CreatedBy,
	@ModifiedDate,
	@ModifiedBy
);

if (@@RowCount = 0) return;

END
ELSE
BEGIN
SET identity_insert [dbo].[Task] on
INSERT INTO [dbo].[Task]
(
	[ID],
	[Description],
	[Note],
	[StatusId],
	[CreatedDate],
	[CreatedBy],
	[ModifiedDate],
	[ModifiedBy]
)
VALUES
(
	@ID,
	@Description,
	@Note,
	@StatusId,
	@CreatedDate,
	@CreatedBy,
	@ModifiedDate,
	@ModifiedBy
);

if (@@RowCount = 0) return;

SET identity_insert [dbo].[Task] off
END


SELECT 
	[dbo].[Task].[description],
	[dbo].[Task].[id],
	[dbo].[Task].[note],
	[dbo].[Task].[statusid],
	[dbo].[Task].[CreatedBy],
	[dbo].[Task].[CreatedDate],
	[dbo].[Task].[ModifiedBy],
	[dbo].[Task].[ModifiedDate],
	[dbo].[Task].[Timestamp]

FROM
[dbo].[Task]
WHERE
	[dbo].[Task].[ID] = SCOPE_IDENTITY();
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gen_Task_Update]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
	drop procedure [dbo].[gen_Task_Update]
GO

CREATE PROCEDURE [dbo].[gen_Task_Update]
(
	@Description [VarChar] (255) = null,
	@Note [Xml] = null,
	@StatusId [Int],
	@ModifiedBy [Varchar] (50) = null,
	@ModifiedDate [DateTime] = null,
	@Original_ID [Int],
	@Original_Timestamp timestamp
)
AS

IF (@ModifiedDate IS NULL)
SET @ModifiedDate = getdate();

SET NOCOUNT ON;
UPDATE 
	[dbo].[Task] 
SET
	[Description] = @Description,
	[Note] = @Note,
	[StatusId] = @StatusId,
	[ModifiedBy] = @ModifiedBy,
	[ModifiedDate] = @ModifiedDate

WHERE
	[dbo].[Task].[ID] = @Original_ID AND
	[dbo].[Task].[Timestamp] = @Original_Timestamp


if (@@RowCount = 0) return;

SELECT
	[dbo].[Task].[description],
	[dbo].[Task].[id],
	[dbo].[Task].[note],
	[dbo].[Task].[statusid],
	[dbo].[Task].[CreatedBy],
	[dbo].[Task].[CreatedDate],
	[dbo].[Task].[ModifiedBy],
	[dbo].[Task].[ModifiedDate],
	[dbo].[Task].[Timestamp]
FROM 
[dbo].[Task]
WHERE
	[dbo].[Task].[ID] = @Original_ID
GO

--##SECTION END [INTERNAL STORED PROCS]

